<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page isELIgnored="false" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>账号管理</title>
    <style type="text/css">
    </style>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
    <input type="hidden" id="flag" value="${flag}">
        
    </div>
    <div id="ligergrid1" class="sq-grid"></div>
</div>


<script type="text/javascript">
    var grid = null;
    $(function () {
        grid = $("#ligergrid1").ligerGrid({
            url: '<%=path%>/rfbase/fribaseinfo/initBaList.do?fundRasInsId=${fundRasInsId}',
            method: 'get',
            columns: [
                {display: '账户名称', name: 'accNm', minWidth: 150},
                {display: '账号', name: 'accNum', minWidth: 50},
                {display: '开户行', name: 'banAccNm', minWidth: 150},
                {display: '开户行号', name: 'banAccNum', minWidth: 150},
                
                {display: '选择', minWidth: 50,
                    render: function (rowdata, rowindex, value){
                        var h='<a onclick="choose(\''+rowdata.accNum+'\',\''+rowdata.accNm+'\',\''+rowdata.banAccNm+'\',\''+rowdata.banAccNum+'\',\''+rowdata.id+'\');"></i>选择</a>'
                        return h;
                    }
                },
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            allowUnSelectRow: true,
            alternatingRow: false
        });
        grid.setHeight(100);

        $("#searchBar").ligerForm();

        $("#pageloading").hide();

        $("#searchBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            }
            grid.reload();
        });


    });

    function choose(accNum,accNm,banAccNm,banAccNum,id){
    		parent.$("#accNumZy").html(accNum);
            parent.$("#accNmZy").html(accNm);
            parent.$("#banAccNmZy").html(banAccNm);
            parent.$("#banAccNumZy").html(banAccNum);
            parent.$("#bankAccInfoId").val(id);
    	
        frameElement.dialog.close();
    }

</script>

</body>
</html>